﻿

'Description:派工管理业务类接口
'Copyright (c) : 通力凯顿（北京）系统集成有限公司
'Writer:Yangsj
'create Date:2017-4-14
'Rewriter:
'Rewrite Date:
Imports BusinessRule.DTO

Public Interface uLMSDispatchIBusiness

    ''' <summary>
    ''' yuxj20221130 增加记录已经派工的记录数    
    ''' </summary>
    ''' <param name="containerid"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdateEngineStepdispatchCount(ByVal containerid As String) As Boolean

    ''' <summary>
    ''' 查询工区已派的班 yuxj2022优化sql
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetZSWorkCenterShift(ByVal para As Dictionary(Of String, String)) As uMESProcessResult

    Function GetContainerPreparationDataNew(ByVal QueryCondition As System.Collections.Generic.Dictionary(Of String, String)) As DTO.uMESProcessResult

    ''' <summary>
    ''' yuxj集件大阶段时间调整查询sql
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetCollectContainer(ByVal para As Dictionary(Of String, String)) As DTO.uMESProcessResult
    ''' <summary>
    ''' 获取工区协作数据   
    ''' </summary>
    ''' <param name="QueryCondition"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetContainerCooperationData(ByVal QueryCondition As Dictionary(Of String, String)) As uMESProcessResult

    ''' <summary>
    ''' 获取选定流水卡已申请的工序
    ''' create:Wangjh
    ''' </summary>
    ''' <param name="QueryCondition"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetWorkCenterDisPatchSpecList(ByVal QueryCondition As System.Collections.Generic.Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 获取生产准备数据
    ''' </summary>
    ''' <param name="QueryCondition"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetContainerPreparationData(ByVal QueryCondition As Dictionary(Of String, String)) As uMESProcessResult

    ''' <summary>
    ''' 获取班组派工数据
    ''' create:Wangjh
    ''' </summary>
    ''' <param name="QueryCondition"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetContainerTeamDispatch(ByVal QueryCondition As System.Collections.Generic.Dictionary(Of String, String)) As DTO.uMESProcessResult

    ''' <summary>
    ''' 修改批次班组派工数据
    ''' Create:Wangjh
    ''' </summary>
    ''' <param name="teamID"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdatetContainerTeamDispatch(ByVal teamID As String, ByVal workcenterID As String, ByVal containerTeamDispatchID As String) As Boolean

    ''' <summary>
    ''' '获取派工数据（新） create by tianFW 2018年6月27日
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetContainerStepDispatchDataNew(ByVal para As Dictionary(Of String, String)) As DTO.uMESProcessResult

    ''' <summary>
    ''' 获取生产派工详细信息 create by tianFW 2018年6月27日
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetStepDispatchDetail(ByVal para As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 获取生产派工状态查询处理 create by tianFw 2018年6月27日
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetSearchStepDispatchStatus(ByVal para As Dictionary(Of String, String)) As String

    ''' <summary>
    ''' 获取工序工具列表数据
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetStepToolsData(ByVal para As Dictionary(Of String, String), ByVal type As String, Optional ByVal isCludeStepInfo As Boolean = False) As DataTable

    ''' <summary>
    ''' 获取工序、工步工具信息 create tianFW 2018年4月24日
    ''' </summary>
    ''' <param name="StepIDs"></param>
    ''' <param name="type"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetStepToolsInfo(ByVal StepIDs As String, ByVal type As String) As DataTable

    Function GetAuxToolsInfoByStepID(ByVal workflowstepIds As String, ByVal containerIds As String, Optional ByVal isCludeStepInfo As Boolean = False) As DataTable
    Function GetAuxToolsInfoByStepInfoID(ByVal stepInfoIds As String) As DataTable
    ''' <summary>
    ''' 保存生产准备申请数据
    ''' </summary>
    ''' <param name="QueryCondition"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function SaveArrangementsData(ByVal QueryCondition As Dictionary(Of String, Object)) As Boolean

    ''' <summary>
    ''' 添加批次工区协作
    ''' create tianFW
    ''' </summary>
    ''' <param name="entity"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function AddContainerWorkCenterDispatchInfo(ByVal entity As ContainerWorkCenterDispatchDTO) As Boolean

    ''' <summary>
    ''' 协作接收
    ''' create:Wangjh
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdateContainerWorkCenterDispatch(ByVal para As Dictionary(Of String, String)) As Boolean

    ''' <summary>
    ''' 添加批次班组派工
    ''' create tianFW
    ''' </summary>
    ''' <remarks></remarks>
    Function AddContainerTeamDispatchInfo(ByVal entity As ContainerTeamDispatchDTO) As Boolean

    ''' <summary>
    ''' 添加批次工序派工
    ''' create tianFW
    ''' </summary>
    ''' <remarks></remarks>
    Function AddContainerStepDispatchInfo(ByVal entity As ContainerStepDispatchDTO) As Boolean
    Function FillContainerStepDispatchInfo(ByVal entity As ContainerStepDispatchDTO) As Object()
    ''' <summary>
    ''' 按唯一ID删除批次班组派工
    ''' create tianFW
    ''' </summary>
    ''' <remarks></remarks>
    Function DelContainerTeamDispatchByctdid(ByVal containerteamdispatchid As String) As Boolean

    ''' <summary>
    ''' 按唯一ID删除批次工序派工
    ''' create tianFW
    ''' </summary>
    ''' <remarks></remarks>
    Function DelContainerStepDispatchBycsdid(ByVal containerStepDispatchID As String) As Boolean

    ''' <summary>
    ''' 更新工序派工
    ''' create tianFW
    ''' </summary>
    ''' <param name="UpdateCondition"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdateContainerStepDispatch(ByVal UpdateCondition As System.Collections.Generic.Dictionary(Of String, Object)) As Boolean

    ''' <summary>
    ''' 按唯一ID删除批次工区协作
    ''' create tianFW
    ''' </summary>
    ''' <remarks></remarks>
    Function DelContainerWorkCenterDispatchBycwdid(ByVal containerworkcenterdispatchid As String) As Boolean

    ''' <summary>
    ''' 获取生产派工表信息
    ''' create tianFW
    ''' </summary>
    ''' <param name="QueryCondition"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetStepDispatchSpecList(ByVal QueryCondition As System.Collections.Generic.Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 获取批次已派工数
    ''' creat:Wangjh 2017-6-15
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetContainerQtyOfDispach(ByVal containerID As String) As DataTable
    ''' <summary>
    ''' 获取指定批次的工区协作信息或者转工信息
    ''' create:Wangjh 2017-6-23
    ''' </summary>
    ''' <param name="para"></param>
    ''' <param name="type"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetWorkCenterORShipInfo(ByVal para As Dictionary(Of String, String), ByVal type As Integer) As DataTable

    ''' <summary>
    ''' 获取已经工区协作的工序ID create tianFW
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetWorkCenterWorkflowStepIDs(ByVal ContainerID As String) As DataTable

    ''' <summary>
    ''' 添加派工详细信息 add tianFW 2017-08-08
    ''' </summary>
    ''' <param name="ContainerStepDispatchID"></param>
    ''' <param name="Workerid"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function AddDispatchdetails(ByVal ContainerStepDispatchID As String, ByVal Workerid As String, Optional ByVal isZS As Boolean = False) As Boolean
    Function FillDispatchdetails(ByVal ContainerStepDispatchID As String, ByVal Workerid As String, Optional ByVal isZS As Boolean = False) As Object()
    ''' <summary>
    ''' 根据派工ID获取派工详细信息 add tianFW 2017-08-08
    ''' </summary>
    ''' <param name="ContainerStepDispatchID"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetDispatchdetails(ByVal ContainerStepDispatchID As String, Optional ByVal isZS As Boolean = False) As DataTable

    ''' <summary>
    ''' 删除派工详细信息dd tianFW 2017-08-08
    ''' </summary>
    ''' <param name="ContainerStepDispatchID"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function DelDispatchdetails(ByVal ContainerStepDispatchID As String, Optional ByVal isZS As Boolean = False) As Boolean

    ''' <summary>
    ''' 根据ContainerID，员工id、工序id获取派工信息 create tianFW
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetDispatchingWoker(ByVal para As Dictionary(Of String, String)) As Integer

    ''' <summary>
    ''' 根据ContainerID，工序id获取派工信息 create tianFW
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetHistoryDispatching(ByVal para As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 保存生产准备程序准备
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function SaveOrderPrepare(ByVal para As Dictionary(Of String, String)) As Boolean

    ''' <summary>
    ''' 获取已派工工人信息 create tianFW
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetDispatchWorkerList(ByVal para As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 获取员工的未报工的派工数和总工时 create tianFW
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetWorkerDonotWorkReportQtyAndTotalUnit(ByVal para As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 获取批次工序班组派工信息
    ''' create:Wangjh
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetStepTeamDispatch(ByVal para As Dictionary(Of String, String)) As DataSet

    ''' <summary>
    ''' 获取数控工序信息 create tianFW 2017/10/16
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetSKGXInfo(ByVal stepID As String, ByVal type As String) As DataTable

    ''' <summary>
    ''' 根据WorkFlowID获取已经存在派工的工序
    ''' create:Wangjh 2017-10-16
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetDispathStepByWorkflowID(ByVal para As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 装试组派工 create tianFW 2017年11月24日
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function ZSTeamDispatch(ByVal dto As ContainerTeamDispatchDTO) As Boolean

    ''' <summary>
    ''' 获取装试的批次信息 create tianFW 2017年11月30日
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetZSContainerInfo(ByVal para As Dictionary(Of String, String)) As uMESProcessResult
    ''' <summary>
    ''' add by longb 2023-06-12
    ''' 获取装试的批次信息(排产下发-班组长派工)
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetNewZSContainerInfo(ByVal para As Dictionary(Of String, String)) As uMESProcessResult

    ''' <summary>
    ''' 获取工区派工信息 Yuxj20190516
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetZSWorkCenterDispatch(ByVal para As Dictionary(Of String, String)) As uMESProcessResult

    ''' <summary>
    ''' 获取员工的派工和报工信息
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetWorkerDisAndReportInfo(ByVal para As Dictionary(Of String, String)) As uMESProcessResult

    ''' <summary>
    ''' 获取同件号同工序的上一次派工信息
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetLastDispatchInfoofProductAndSpet(ByVal para As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 获取班组派工页面的查询资料 Add by Yuxj20180126
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetShiftTeamSearchData(ByVal para As Dictionary(Of String, String)) As DataSet

    ''' <summary>
    ''' 获取装试发动机工艺路线 Yuxj20180201
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetMachineStepList(ByVal para As Dictionary(Of String, String)) As DataTable


    ''' <summary>
    ''' 获取已接收的工区协作信息 create tianFW 2018年4月9日
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetWorkCenterInfo(ByVal para As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 撤销工区协作 create tianFW 2018年4月9日
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function ReverseWorkCenterInfo(ByVal para As Dictionary(Of String, String)) As Boolean

    ''' <summary>
    ''' 获取没有检验记录的工序没有报工的派工记录
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetDispatchIDOfNotWorkReportAndStepNoCheckInfo(ByVal para As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 获取批次已经完工的工序 create tianFW 2018年4月18日
    ''' </summary>
    ''' <param name="ContainerIDs"></param>
    ''' <param name="WorkflowID"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetIsCompletedStep(ByVal ContainerIDs As String, ByVal WorkflowID As String) As DataTable

    ''' <summary>
    ''' 获取已经工区协作但未加工完成的记录
    ''' add:Wangjh 20180418
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetWorkcenterDispatchOfNoCompete(ByVal para As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 获取已申请的工序工具情况 add YangJiang 20180419
    ''' </summary>
    ''' <param name="ContainerID"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetStepToolsInfoPrepara(ByVal ContainerID As String, ByVal WorkFlowstepID As String) As DataTable

    ''' <summary>
    ''' 更新工装工具状态
    ''' add:Wangjh 20180816
    ''' </summary>
    ''' <param name="id"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdateArrangToolStatus(ByVal id As String) As Boolean

    ''' <summary>
    ''' 获取主页显示生产准备数据 add YangJiang 20180420
    ''' </summary>
    ''' <param name="QueryCondition"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetContainerPreparationData1(ByVal QueryCondition As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 获取分厂代码  add YangJiang 20180510
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetFactoyCode(ByVal FactoryID As String) As String

    ''' <summary>
    ''' 获取装试阶段报工订单信息 create tianFW 2018年5月4日
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetStageWorkReportOrderInfo(ByVal para As Dictionary(Of String, String)) As uMESProcessResult

    ''' <summary>
    ''' 装试 根据工艺和订单获取工艺工序的状态 create tianFW 2018年5月4日
    ''' </summary>
    ''' <param name="type">查询类型 “engine”-发动机大阶段 其他 </param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetStageWorkflowStepInfo(ByVal type As String, ByVal para As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 验证装试的批次是否存在报工或者检验 create tianFW 2018年5月17日
    ''' </summary>
    ''' <param name="value"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function VerifyZSContainerExistWorkReportOrCheckInfo(ByVal value As String) As Boolean

    ''' <summary>
    ''' 修改装试的工区长或班长派工 create by tianFW 2018年5月17日
    ''' </summary>
    ''' <param name="containerTeamDispatchInfoID">班组派工唯一id</param>
    ''' <param name="value">修改的值</param>
    ''' <param name="type">修改的类型 Shift-0 Team-1</param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function ChangeZSTeamDispatchInfo(ByVal containerTeamDispatchInfoID As String, ByVal value As String, ByVal type As Integer) As Boolean

    ''' <summary>
    ''' 修改装试的工序工步派工记录信息 createt tianFW 2018年5月18日
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdateZSDispatchInfo(ByVal para As Dictionary(Of String, Object)) As Boolean

    ''' <summary>
    ''' 获取生产派工单件单卡批次信息 create by tianFW 2018年6月12日
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetStepDispatchSingleContainer(ByVal para As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 判断工序是否已经进行工具准备申请 add YangJiang 20180705
    ''' </summary>
    ''' <param name="ContainerID"></param>
    ''' <param name="WorkFlowStepID"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetIsToolPrepare(ByVal ContainerID As String, ByVal WorkFlowStepID As String) As Boolean

    ''' <summary>
    ''' 判断工序是否已经进行了程序准备 add YangJiang 20180709
    ''' </summary>
    ''' <param name="ContainerIDs"></param>
    ''' <param name="WorkFlowStepID"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetIsOrNoOrderPrepare(ByVal ContainerIDs As String, ByVal WorkFlowStepID As String) As Boolean
    ''' <summary>
    ''' Add by Yuxj20180719根据批次ID获取所有派工记录
    ''' </summary>
    ''' <param name="Cid"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetDispatchDataByCid(ByVal Cid As String) As DataTable

    ''' <summary>
    ''' 根据批次ID或协作工区ID获取存在工区协作但没有完成的信息 create by tianFW 2018年7月25日
    ''' </summary>
    ''' <param name="containerid"></param>
    ''' <param name="toworkcenterid"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetNotUseCompletedWorkCenterInfo(ByVal containerid As String, ByVal toworkcenterid As String) As DataTable


    ''' <summary>
    ''' 获取装试派工继承员工信息 create by tianFW 2018年8月1日
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetZSLastDispatchInfo(ByVal para As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' Add by Yuxj20180719根据工艺Id获取所有工步/工序
    ''' </summary>
    ''' <param name="wfid"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetStepInfobyWorkflowId(ByVal wfid As String) As DataTable

    ''' <summary>
    ''' Add by Yuxj20180929
    ''' 工区长，班长派工时相同发动机件号的同一部件派工的班组继承功能
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetNearestDispatch(ByVal para As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 获取工序生产排产时间　create by tianFW 2018年10月15日 
    ''' </summary>
    ''' <param name="containerID">批次ID</param>
    ''' <param name="workflowstepID">工序ID</param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetWorkflowstepPlanTimeInfo(ByVal containerID As String, ByVal workflowstepID As String) As DataTable

    ''' <summary>
    ''' Add by Yuxj20181114
    ''' 撤销大阶段报工中的完工工序
    ''' </summary>
    ''' <param name="idList"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function CancelCompleteStep(ByVal idList As String) As Boolean

    ''' <summary>
    ''' Add by Yuxj20181128
    ''' 获取工区，班派工信息为撤销使用
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetContainerRevTeamDispatch(ByVal para As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' Add by Yuxj20181128
    ''' 获取派报检的数据
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetContainerRevStepDispatch(ByVal para As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' Add by Yuxj20181129
    ''' 判断批次是否有生产派工
    ''' </summary>
    ''' <param name="cid"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function isStepDispatch(ByVal cid As String) As Boolean

    ''' <summary>
    ''' Add by Yuxj20181129
    ''' 撤销装试组派工
    ''' </summary>
    ''' <param name="id"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function ReverseTeamDispatchZS(ByVal id As String) As Boolean

    ''' <summary>
    ''' Add by Yuxj20181205 任务单批量生产派工
    ''' </summary>
    ''' <param name="para"></param>
    ''' <param name="ary"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function DispatchAllSelectByWorkflow(ByVal para As Dictionary(Of String, String), ByVal ary As Array, ByVal paraInfo As Dictionary(Of String, Object), Optional ByVal isZs As Boolean = False) As Boolean

    ''' <summary>
    ''' Add by Yuxj20181206
    ''' 判断大阶段是否有任务单（大阶段报工及撤销时用于卡关）
    ''' </summary>
    ''' <param name="PlanId"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function HasContainerNo(ByVal PlanId As String) As Boolean

    ''' <summary>
    ''' Add by Yuxj20181217根据批次ID获取所有检验合格记录
    ''' </summary>
    ''' <param name="Cid"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetCheckInfoDataByCid(ByVal Cid As String) As DataTable

    ''' <summary>
    ''' Add by Yuxj20181218
    ''' 获取施工单是否已经对本工序派工
    ''' </summary>
    ''' <param name="Cid"></param>
    ''' <param name="wfsid"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function HasStepDispatch(ByVal Cid As String, ByVal wfsid As String) As Boolean

    ''' <summary>
    ''' Add by Yuxj20181218
    ''' 更新工序组
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdateWfsTeam(ByVal para As Dictionary(Of String, String)) As Boolean

    ''' <summary>
    ''' Add by Yuxj20181218
    ''' 更新班派工组
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdateTeamDispatchTeam(ByVal para As Dictionary(Of String, String)) As Boolean

    ''' <summary>
    ''' Add by Yuxj20181218
    ''' 如果为施工单工艺，返回True,否则False
    ''' </summary>
    ''' <param name="workflowid"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function CheckWorkFlowType(ByVal workflowid As String) As Boolean

    ''' <summary>
    ''' 更新批次派工状态 
    ''' </summary>
    ''' <param name="containerid">批次ID</param>
    ''' <param name="type">1 存在派工 dispatchnum 2 当前序派工 isdispatch</param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdateContainerDispatchNum(ByVal containerid As String, ByVal type As String) As Boolean
    Function FillUpdateContainerDispatchNum(ByVal containerid As String, ByVal type As String) As Object()
    ''' <summary>
    ''' 更新批次派工记录的状态 add by tianFW 2019年1月15日
    ''' </summary>
    ''' <param name="ContainerStepDispatchIDs"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdateDispatchIsCompleteStatus(ByVal ContainerStepDispatchIDs As String) As Boolean

    ''' <summary>
    ''' 判断是否派工到班组
    ''' </summary>
    ''' <param name="cid"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function CheckTeamDispatch(ByVal cid As String) As DataTable

    ''' <summary>
    ''' 判断是否派工到工序
    ''' </summary>
    ''' <param name="cid"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function CheckStepDispatch(ByVal cid As String) As DataTable

    ''' <summary>
    ''' 判断是否工序报工
    ''' </summary>
    ''' <param name="containerstepdispatchid"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function CheckStepWorkReport(ByVal containerstepdispatchid As String) As DataTable

    ''' <summary>
    ''' 更新分解表工区yuxj20190516
    ''' </summary>
    ''' <param name="wcid"></param>
    ''' <param name="enginelistid"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function updateEngineWcid(ByVal wcid As String, ByVal enginelistid As String) As Boolean

    ''' <summary>
    ''' Modify by Yuxj20190522
    ''' 获取班组派工记录
    ''' </summary>
    ''' <param name="cid"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetTeamShiftDispatch(ByVal cid As String) As DataTable

    ''' <summary>
    ''' 查询生产准备
    ''' create:Wangjh 2017-10-16
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetPreparationStepByWorkflowID(ByVal para As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 获取工序下的工步数据
    ''' </summary>
    ''' <param name="workflowstepId"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetStepInfoListByWorkflowStep(ByVal containerId As String, ByVal workflowstepId As String) As DataTable
    ''' <summary>
    ''' 填充工步派工
    ''' </summary>
    ''' <param name="entity"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function FillContainerStepInfoDispatchDataSql(ByVal entity As ContainerStepDispatchDTO) As Object()
    ''' <summary>
    ''' 填充工步派工多派工工人数据
    ''' </summary>
    ''' <param name="ContainerStepDispatchID"></param>
    ''' <param name="Workerid"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function FillStepInfoDispatchDetails(ByVal ContainerStepDispatchID As String, ByVal Workerid As String) As Object()
    ''' <summary>
    ''' 更新批次派工记录的状态（工步）
    ''' </summary>
    ''' <param name="ContainerStepDispatchIDs"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdateDispatch2IsCompleteStatus(ByVal ContainerStepDispatchIDs As String) As Boolean
    ''' <summary>
    ''' 获取待派工批次列表（工步）
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetContainerStepInfoDispatchList(ByVal para As Dictionary(Of String, String)) As uMESProcessResult
    ''' <summary>
    ''' 获取待派工批次列表（热表工步）
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetRBContainerStepInfoDispatchList(ByVal para As Dictionary(Of String, String)) As uMESProcessResult
    ''' <summary>
    ''' 获取待派工工步详细
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetContainerStepInfoDisDetail(ByVal para As Dictionary(Of String, String)) As DataTable
    ''' <summary>
    ''' 验证批次在制工序下的工步信息
    ''' </summary>
    ''' <param name="containerId"></param>
    ''' <param name="workflowstepId"></param>
    ''' <param name="msg"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function IsVaildSeqForStepInfo(ByVal containerId As String, ByVal workflowstepId As String, ByRef msg As String) As Boolean
    ''' <summary>
    ''' 验证工序是否所有工步派工完成
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function IsStepInfoDispatched(ByVal para As DataRow) As Boolean
    ''' <summary>
    ''' 获取可删除工步派工
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetStepInfoDeletableDispatchInfo(ByVal para As Dictionary(Of String, String)) As uMESProcessResult
    ''' <summary>
    ''' 删除工步派工
    ''' </summary>
    ''' <param name="containerStepDispatchID"></param>
    ''' <param name="list"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function DelContainerStepDispatch2Bycsdid(ByVal containerStepDispatchID As String, ByVal list As List(Of Dictionary(Of String, String)), ByRef msg As String) As Boolean

    ''' <summary>
    ''' 派工后自动发起工装及辅料准备申请(工序) add zhunan 2022.12.8
    ''' </summary>
    ''' <param name="dtWorkflowstep">派工所选工序</param>
    ''' <param name="containerid">批次id</param>
    ''' <param name="para">其他参数</param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function SaveSpecArrangementsAfterDispatching(ByVal dtWorkflowstep As DataTable, ByVal containerid As String, ByVal para As Dictionary(Of String, String)) As ArrayList

    ''' <summary>
    ''' 派工后自动发起工装及辅料准备申请(工步) add zhunan 2022.12.8
    ''' </summary>
    ''' <param name="stepDr"></param>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function SaveStepArrangementsAfterDispatching(ByVal stepDr As DataRow, ByVal para As Dictionary(Of String, String)) As ArrayList

    ''' <summary>
    ''' 生成插入生产准备信息sql
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetInsertArrangementsSql(ByVal para As Dictionary(Of String, String)) As ArrayList
    ''' <summary>
    ''' 删除工步派工（通过工序） add by zhangrj 2023-3-7
    ''' </summary>
    ''' <param name="list"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function DelContainerStepDispatch2BySpec(ByVal list As List(Of Dictionary(Of String, String))) As Boolean
    ''' <summary>
    ''' 填充自检自分的首件报工
    ''' </summary>
    ''' <param name="disDto"></param>
    ''' <param name="workerId"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function FillSelfCheckData(ByVal disDto As ContainerStepDispatchDTO, ByVal workerId As String) As List(Of Object())
    ''' <summary>
    ''' 获取待派工工步详细（热表）
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetRBContainerStepInfoDisDetail(ByVal para As Dictionary(Of String, String)) As DataTable
End Interface
